home *** CD-ROM | disk | FTP | other *** search
/ Day by Day Vision: Paris / Day by Day Vision: Paris.iso / mac / slide / DATA / MAIN.Dxr / 00047.ls < prev    next >
Encoding:
Text File  |  1997-10-03  |  11.2 KB  |  445 lines

  1. global gpicnum, gsumnum, oldt, chkbtn, vlist, oldvoicenum, oldmusicnum, waitt, gsp, alist, alistsum, gtime, gmlist, gpiclist, am, gslideh, gtemptime, grollflg, gslideh29, gvlist, gsoundlevel, gtlist, gtrans, gtranno, picnum, gmdflg, amusic
  2.  
  3. on init
  4.   set gmdflg to 0
  5.   set the fileName of cast 1 to "DUMMY.PIC"
  6.   set gpopb to 0
  7.   set gpicnum to 0
  8.   set oldsnum to 0
  9.   set mcount to 0
  10.   set chkbtn to 0
  11.   puppetSprite(2, 1)
  12.   repeat with i = 9 to 14
  13.     puppetSprite(i, 1)
  14.   end repeat
  15.   repeat with i = 9 to 14
  16.     set the visible of sprite i to 0
  17.   end repeat
  18.   repeat with i = 20 to 32
  19.     puppetSprite(i, 1)
  20.   end repeat
  21.   repeat with i = 20 to 32
  22.     set the visible of sprite i to 0
  23.   end repeat
  24.   set gmlist to [0, 1, 0]
  25.   set io to fileio(mnew, "read", the moviePath & "pic.txt")
  26.   if objectp(io) then
  27.     set gpiclist to io(mreadfile)
  28.     io(mdispose)
  29.   end if
  30. end
  31.  
  32. on picnum num
  33.   set gtime to the ticks
  34.   case num of
  35.     "a":
  36.       set vlist to gpiclist
  37.       set gsumnum to the number of lines in gpiclist
  38.   end case
  39.   go(marker(2))
  40. end
  41.  
  42. on startMovie
  43.   set amusic to 1
  44.   set gslideh to 32
  45.   set gslideh29 to 34
  46.   set gtemptime to 300
  47.   set gtranno to 0
  48.   set gvlist to [0, 1, 0]
  49.   set gsoundlevel to the soundLevel
  50.   set the soundLevel to 4
  51.   set gtlist to [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  52.   set gtrans to 5
  53. end
  54.  
  55. on stopMovie
  56.   set the fileName of cast 1 to "DUMMY.PIC"
  57.   sound stop 1
  58.   set the soundLevel to gsoundlevel
  59. end
  60.  
  61. on nextph
  62.   if chkbtn = 1 then
  63.     set gpicnum to gpicnum + 1
  64.     set gtime to the ticks
  65.     if gpicnum > gsumnum then
  66.       set gpicnum to 1
  67.     end if
  68.     if gtranno = 0 then
  69.       set picnum to item 1 of line gpicnum of vlist
  70.       set the fileName of cast 1 to picnum
  71.       set the locH of sprite 2 to 0
  72.       set the locV of sprite 2 to 0
  73.       set the castNum of sprite 2 to 1
  74.       updateStage()
  75.     else
  76.       if gmdflg = 1 then
  77.         popbtnon()
  78.         exit
  79.       else
  80.         go("PT")
  81.       end if
  82.     end if
  83.   end if
  84. end
  85.  
  86. on backph
  87.   if chkbtn = 1 then
  88.     set gpicnum to gpicnum - 1
  89.     if gpicnum < 1 then
  90.       set gpicnum to gsumnum
  91.     end if
  92.     set picnum to item 1 of line gpicnum of vlist
  93.     set the fileName of cast 1 to picnum
  94.     set the castNum of sprite 2 to 1
  95.     updateStage()
  96.   end if
  97. end
  98.  
  99. on tomenu
  100.   if chkbtn = 1 then
  101.     init()
  102.     puppetSprite(2, 0)
  103.     updateStage()
  104.     unLoad()
  105.     sound stop 2
  106.     set the visible of sprite 5 to 0
  107.     updateStage()
  108.     go("top")
  109.   end if
  110. end
  111.  
  112. on pikabtn
  113.   set chkbtn to 1
  114.   set oldt to the ticks
  115. end
  116.  
  117. on musicbtn
  118.   set amh to mouseH()
  119.   set abtnh to the locH of sprite 13
  120.   if (amh >= (abtnh + 12)) and (amh < (abtnh + 25)) then
  121.     set gmlist to [1, 0, 0]
  122.   else
  123.     if (amh >= (abtnh + 40)) and (amh < (abtnh + 54)) then
  124.       set gmlist to [0, 1, 0]
  125.     else
  126.       if (amh >= (abtnh + 58)) and (amh < (abtnh + 72)) then
  127.         set gmlist to [0, 0, 1]
  128.       else
  129.         if amh >= (abtnh + 75) then
  130.           nothing()
  131.         end if
  132.       end if
  133.     end if
  134.   end if
  135.   set amusic2 to getPos(gmlist, 1)
  136.   set the memberNum of sprite 13 to 12 + amusic2
  137.   if amusic2 = 1 then
  138.     set the visible of sprite 14 to 0
  139.     set amusic to amusic2
  140.     sound stop 1
  141.   else
  142.     if amusic2 <> amusic then
  143.       sound stop 1
  144.       set amusic to amusic2
  145.     end if
  146.     set the visible of sprite 14 to 1
  147.   end if
  148.   updateStage()
  149. end
  150.  
  151. on popbtnon
  152.   set mh to 100
  153.   set mv to 445
  154.   set the locH of sprite 10 to mh
  155.   set the locV of sprite 10 to mv
  156.   set the locH of sprite 11 to the locH of sprite 10 + 67
  157.   set the locV of sprite 11 to mv
  158.   set the locH of sprite 12 to the locH of sprite 10 - 67
  159.   set the locV of sprite 12 to mv
  160.   set the locH of sprite 9 to mh
  161.   set the locV of sprite 9 to mv - 28
  162.   set the locH of sprite 13 to the locH of sprite 10 - 2
  163.   set the locV of sprite 13 to the locV of sprite 10 - 41
  164.   set the locH of sprite 14 to the locH of sprite 10 - 2
  165.   set the locV of sprite 14 to the locV of sprite 10 - 24
  166.   set the locH of sprite 21 to the locH of sprite 10 - 2
  167.   set the locV of sprite 21 to the locV of sprite 10 - 58
  168.   set the locH of sprite 22 to the locH of sprite 10 + 32
  169.   set the locV of sprite 22 to the locV of sprite 10 - 58
  170.   set the locH of sprite 23 to the locH of sprite 10 - 14
  171.   set the locV of sprite 23 to the locV of sprite 10 - 58
  172.   set the locH of sprite 24 to the locH of sprite 10 + gslideh
  173.   set the locV of sprite 24 to the locV of sprite 10 - 58
  174.   set the locH of sprite 25 to the locH of sprite 10 - 2
  175.   set the locV of sprite 25 to the locV of sprite 10 - 75
  176.   updateStage()
  177.   repeat with i = 10 to 13
  178.     set the visible of sprite i to 1
  179.   end repeat
  180.   if the memberNum of sprite 13 <> 13 then
  181.     set the visible of sprite 14 to 1
  182.   end if
  183.   repeat with i = 21 to 25
  184.     set the visible of sprite i to 1
  185.   end repeat
  186.   go(the frame + 1)
  187.   set chkbtn to 0
  188.   set grollflg to 0
  189.   set the visible of sprite 5 to 1
  190. end
  191.  
  192. on popbtnoff
  193.   set the visible of sprite 5 to 0
  194.   set chkbtn to 1
  195.   repeat with i = 10 to 14
  196.     set the visible of sprite i to 0
  197.   end repeat
  198.   repeat with i = 21 to 32
  199.     set the visible of sprite i to 0
  200.   end repeat
  201. end
  202.  
  203. on soundchk
  204.   if (gtime + gtemptime) <= the ticks then
  205.     set chkbtn to 1
  206.   else
  207.     set chkbtn to 0
  208.   end if
  209. end
  210.  
  211. on usercont
  212.   if rollOver(9) then
  213.     set grollflg to 1
  214.   else
  215.     if grollflg = 1 then
  216.       popbtnoff()
  217.       go(the frame - 1)
  218.       exit
  219.     end if
  220.   end if
  221.   go(the frame)
  222. end
  223.  
  224. on slideshow
  225.   soundchk()
  226.   nextph()
  227.   go(the frame)
  228.   toend()
  229. end
  230.  
  231. on toend
  232.   if gpicnum = gsumnum then
  233.     set chkbtn to 1
  234.     go("end")
  235.   end if
  236. end
  237.  
  238. on slideractiveh
  239.   repeat while the stillDown
  240.     set newh to constrainH(23, mouseH())
  241.     set the locH of sprite 24 to newh
  242.     set gslideh to newh - the locH of sprite 10
  243.     updateStage()
  244.   end repeat
  245.   if gslideh = 32 then
  246.     set gtemptime to 300
  247.   else
  248.     set wk to gslideh - 32
  249.     set gtemptime to 300 - (wk * 4)
  250.   end if
  251. end
  252.  
  253. on transitionbtn
  254.   set amh to mouseH()
  255.   if (amh < 10) or (amh > 105) then
  256.     exit
  257.   end if
  258.   repeat with i = 9 to 14
  259.     set the visible of sprite i to 0
  260.   end repeat
  261.   repeat with i = 21 to 24
  262.     set the visible of sprite i to 0
  263.   end repeat
  264.   repeat with i = 26 to 32
  265.     set the visible of sprite i to 1
  266.   end repeat
  267.   set the locH of sprite 26 to the locH of sprite 25
  268.   set the locV of sprite 26 to the locV of sprite 25 + 17
  269.   set the locH of sprite 27 to the locH of sprite 25 + 34
  270.   set the locV of sprite 27 to the locV of sprite 25 + 17
  271.   set the locH of sprite 28 to the locH of sprite 25 - 12
  272.   set the locV of sprite 28 to the locV of sprite 25 + 12
  273.   set the locH of sprite 29 to the locH of sprite 25 + 34 + gslideh29 - 34
  274.   set the locV of sprite 29 to the locV of sprite 25 + 17
  275.   set the locH of sprite 30 to the locH of sprite 25 + 2
  276.   set the locV of sprite 30 to the locV of sprite 25 + 38
  277.   set the locH of sprite 31 to the locH of sprite 25 + 2
  278.   set the locV of sprite 31 to the locV of sprite 25 + 63
  279.   set the locH of sprite 32 to the locH of sprite 25 + 2
  280.   set the locV of sprite 32 to the locV of sprite 25 + 88
  281.   if the memberNum of sprite 30 = 27 then
  282.     repeat with c = 26 to 29
  283.       set the visible of sprite c to 0
  284.     end repeat
  285.   end if
  286.   updateStage()
  287. end
  288.  
  289. on tranchk
  290.   global abtnh, abtnv, am
  291.   set amh to mouseH()
  292.   set amv to mouseV()
  293.   set abtnh to the locH of sprite 25
  294.   set abtnv to the locV of sprite 25
  295.   if (amv >= (abtnv + 28)) and (amv < (abtnv + 51)) then
  296.     if (amh >= (abtnh - 78)) and (amh < (abtnh - 51)) then
  297.       set gtlist to [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  298.     else
  299.       if (amh >= (abtnh - 34)) and (amh < (abtnh - 6)) then
  300.         set gtlist to [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  301.       else
  302.         if (amh >= (abtnh + 9)) and (amh < (abtnh + 37)) then
  303.           set gtlist to [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  304.         else
  305.           if (amh >= (abtnh + 48)) and (amh < (abtnh + 80)) then
  306.             set gtlist to [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]
  307.           end if
  308.         end if
  309.       end if
  310.     end if
  311.   end if
  312.   if (amv >= (abtnv + 54)) and (amv < (abtnv + 77)) then
  313.     if (amh >= (abtnh - 78)) and (amh < (abtnh - 51)) then
  314.       set gtlist to [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]
  315.     else
  316.       if (amh >= (abtnh - 34)) and (amh < (abtnh - 6)) then
  317.         set gtlist to [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0]
  318.       else
  319.         if (amh >= (abtnh + 9)) and (amh < (abtnh + 37)) then
  320.           set gtlist to [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
  321.         else
  322.           if (amh >= (abtnh + 48)) and (amh < (abtnh + 80)) then
  323.             set gtlist to [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]
  324.           end if
  325.         end if
  326.       end if
  327.     end if
  328.   end if
  329.   if (amv >= (abtnv + 79)) and (amv < (abtnv + 102)) then
  330.     if (amh >= (abtnh - 78)) and (amh < (abtnh - 51)) then
  331.       set gtlist to [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0]
  332.     else
  333.       if (amh >= (abtnh - 34)) and (amh < (abtnh - 6)) then
  334.         set gtlist to [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0]
  335.       else
  336.         if (amh >= (abtnh + 9)) and (amh < (abtnh + 37)) then
  337.           set gtlist to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]
  338.         else
  339.           if (amh >= (abtnh + 48)) and (amh < (abtnh + 80)) then
  340.             set gtlist to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
  341.           end if
  342.         end if
  343.       end if
  344.     end if
  345.   end if
  346.   set am to getPos(gtlist, 1)
  347.   if (am >= 1) and (am <= 4) then
  348.     set the memberNum of sprite 30 to 26 + am
  349.     set the memberNum of sprite 31 to 31
  350.     set the memberNum of sprite 32 to 36
  351.     updateStage()
  352.   else
  353.     if (am >= 5) and (am <= 8) then
  354.       set the memberNum of sprite 30 to 26
  355.       set the memberNum of sprite 31 to 27 + am
  356.       set the memberNum of sprite 32 to 36
  357.       updateStage()
  358.     else
  359.       if (am >= 9) and (am <= 12) then
  360.         set the memberNum of sprite 30 to 26
  361.         set the memberNum of sprite 31 to 31
  362.         set the memberNum of sprite 32 to 28 + am
  363.         updateStage()
  364.       end if
  365.     end if
  366.   end if
  367.   case am of
  368.     1:
  369.       set gtranno to 0
  370.     2:
  371.       set gtranno to 26
  372.     3:
  373.       set gtranno to 51
  374.     4:
  375.       set gtranno to 38
  376.     5:
  377.       set gtranno to 28
  378.     6:
  379.       set gtranno to 27
  380.     7:
  381.       set gtranno to 37
  382.     8:
  383.       set gtranno to 49
  384.     9:
  385.       set gtranno to 41
  386.     10:
  387.       set gtranno to 9
  388.     11:
  389.       set gtranno to 5
  390.     12:
  391.       set gtranno to 7
  392.   end case
  393.   if am = 1 then
  394.     repeat with c = 26 to 29
  395.       set the visible of sprite c to 0
  396.     end repeat
  397.   else
  398.     repeat with c = 26 to 29
  399.       set the visible of sprite c to 1
  400.     end repeat
  401.   end if
  402. end
  403.  
  404. on slidertranh
  405.   repeat while the stillDown
  406.     set newh to constrainH(28, mouseH())
  407.     set the locH of sprite 29 to newh
  408.     set gslideh29 to newh - the locH of sprite 25
  409.     updateStage()
  410.   end repeat
  411.   set sts to (gslideh29 + 11) / 10
  412.   set gtrans to 10 - sts
  413. end
  414.  
  415. on volumebtn
  416.   set amh to mouseH()
  417.   set abtnh to the locH of sprite 14
  418.   if (amh >= (abtnh + 10)) and (amh < (abtnh + 25)) then
  419.     set gvlist to [1, 0, 0]
  420.   else
  421.     if (amh >= (abtnh + 37)) and (amh < (abtnh + 52)) then
  422.       set gvlist to [0, 1, 0]
  423.     else
  424.       if (amh >= (abtnh + 61)) and (amh < (abtnh + 76)) then
  425.         set gvlist to [0, 0, 1]
  426.       else
  427.         if amh >= (abtnh + 76) then
  428.           nothing()
  429.         end if
  430.       end if
  431.     end if
  432.   end if
  433.   set am to getPos(gvlist, 1)
  434.   set the memberNum of sprite 14 to 15 + am
  435.   case am of
  436.     1:
  437.       set the soundLevel to 1
  438.     2:
  439.       set the soundLevel to 4
  440.     3:
  441.       set the soundLevel to 7
  442.   end case
  443.   updateStage()
  444. end
  445.